import React from "react";
//引入路由
import {Routes,Route} from "react-router-dom";

//引入页面组件
import Login from "./view/Login/Login";
import NotFound from "./view/NotFound/NotFound";
import DashView from "./view/DashView/DashView";
//注册的三个组件，无需登录即可访问
import Register from "./view/Register/Register";
import EnterpriseInformation from './view/EnterpriseInformation/EnterpriseInformation'
import CollectionInformation from './view/CollectionInformation/CollectionInformation'
import RegisterFinish from  './view/RegisterFinish/RegisterFinish'
//引入权限判断，路由重定向组件
import Auth from "./component/Auth";



function App() {

  return (
      <div>
          {/*//路由处理*/}
          <Routes>
              {/*这里展示登录之后的页面*/}
              <Route path="/*" element={<Auth><DashView></DashView></Auth>}></Route>
              {/*登陆页面展示*/}
              <Route path="/login" element={<Login></Login>}></Route>
              <Route path="/register" element={<Register></Register>}></Route>
              <Route path="/enterprise/information" element={<EnterpriseInformation></EnterpriseInformation>}></Route>
              <Route path="/collection/information" element={<CollectionInformation></CollectionInformation>}></Route>
              <Route path="/register/finish" element={<RegisterFinish></RegisterFinish>}></Route>
              {/*匹配不到的路径跳转到404页面*/}
              <Route path="*" element={<NotFound></NotFound>}></Route>
          </Routes>
      </div>
  )
}

export default App
